package activationFunctionPackage;

public class FAheavyside implements FonctionActivation {

	private double centre ;
	public FAheavyside(double centre)
	{
		this.centre = centre ;
	}
	
	public double activation(double somme) 
	{
		if(somme < centre){return 0.0;}
		else{return 1.0;}
	}

	public double deriv(double somme) 
	{
		double res =  ( activation(somme + 0.001) - activation(somme) ) / 0.001 ;
		return res;
	}

}
